package com.jerry.alibaba.transaction.dao;

import com.jerry.alibaba.transaction.entity.Account;
import com.jerry.alibaba.transaction.entity.Storage;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.math.BigDecimal;
import java.util.List;

@Mapper
public interface AccountDao {

    //扣减账户余额
    void decrease(@Param("userId") Long userId, @Param("money") BigDecimal money);

    // 新建账户
    int create(Account account);

    // 获取单个账户详情
    Account getById(@Param("id") Long id);

    // 获取账户列表
    List<Account> getList();

}
